package org.jeecg.modules.zhima.portal.enums;

public enum GameStatus {

    CHECK_FAILED(-2, "审核不通过"),
    WAIT_CHECK(0, "待审核"),
    //已开赛
    PUBLISH(1, "报名中"),
    ACTIVATED(2, "已开赛"),
    FINISH(3, "已结赛"),
    DELETE(-1, "已删除");

    public Integer CODE;

    public String VALUE;

     GameStatus(Integer code, String value){
        this.CODE = code;
        this.VALUE = value;
    }

    public static GameStatus get(Integer code){
         switch (code){
             case 0:
                 return WAIT_CHECK;
             case 1:
                 return PUBLISH;
             case 2:
                 return ACTIVATED;
             case 3:
                 return FINISH;
             case -1:
             default:
                 return DELETE;
         }
    }
}
